#ifndef ACTION_01_ROBOT_H_
#define ACTION_01_ROBOT_H_
#include <iostream>
#include "rclcpp/rclcpp.hpp"
#include "action_interface/action/move_robot.hpp"

class Robot{
public:
  //动作接口类型
  using MoveRobot = action_interface::action::MoveRobot;
  Robot()=default;
  ~Robot()=default;

  float move_step(); 
  bool set_goal(float distance);
  float get_current_pose();
  int get_status();
  bool close_goal(); 
  void stop_move();  
 private:
  float current_pose_ = 0.0;           
  float target_pose_ = 0.0;             
  float move_distance_ = 0.0;            
  std::atomic<bool> cancel_flag_{false}; 
  int status_ = MoveRobot::Feedback::STATUS_STOP;
};

#endif // ACTION_01_ROBOT_H_
